Index: ioemu/Makefile.target
===================================================================
--- ioemu.orig/Makefile.target 2006-08-09 19:54:26.055548240 +0100
-+++ ioemu/Makefile.target 2006-08-09 19:59:49.537686802 +0100
++++ ioemu/Makefile.target 2006-08-09 21:29:37.834611244 +0100
@@ -357,6 +357,7 @@
VL_OBJS+= fdc.o mc146818rtc.o serial.o pc.o
VL_OBJS+= cirrus_vga.o mixeng.o parallel.o acpi.o piix_pci.o
Index: ioemu/hw/pc.c
===================================================================
--- ioemu.orig/hw/pc.c 2006-08-09 19:54:26.133539447 +0100
-+++ ioemu/hw/pc.c 2006-08-09 20:04:32.767826231 +0100
-@@ -572,6 +572,9 @@
- static int parallel_io[MAX_PARALLEL_PORTS] = { 0x378, 0x278, 0x3bc };
- static int parallel_irq[MAX_PARALLEL_PORTS] = { 7, 7, 7 };
++++ ioemu/hw/pc.c 2006-08-09 21:30:30.188733212 +0100
+@@ -874,13 +874,19 @@
-+/* PIIX4 acpi pci configuration space, func 3 */
-+extern void pci_piix4_acpi_init(PCIBus *bus, int devfn);
-+
- #ifdef HAS_AUDIO
- static void audio_init (PCIBus *pci_bus)
- {
-@@ -878,9 +881,15 @@
- usb_uhci_init(pci_bus, piix3_devfn + 2);
- }
+ cmos_init(ram_size, boot_device, bs_table, timeoffset);
+ /* using PIIX4 acpi model */
+ if (pci_enabled && acpi_enabled)
-+ pci_piix4_acpi_init(pci_bus, piix3_devfn + (usb_enabled ? 3 : 2));
++ pci_piix4_acpi_init(pci_bus, piix3_devfn + 2);
+
+ if (pci_enabled && usb_enabled) {
+- usb_uhci_init(pci_bus, piix3_devfn + 2);
++ usb_uhci_init(pci_bus, piix3_devfn + (acpi_enabled ? 3 : 2));
+ }
+
+#ifndef CONFIG_DM
if (pci_enabled && acpi_enabled) {
piix4_pm_init(pci_bus, piix3_devfn + 3);
#if 0
/* ??? Need to figure out some way for the user to
-@@ -903,8 +912,10 @@
+@@ -903,8 +909,10 @@
/* XXX: should be done in the Bochs BIOS */
if (pci_enabled) {
pci_bios_init();
Index: ioemu/hw/piix4acpi.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ ioemu/hw/piix4acpi.c 2006-08-09 20:00:56.118008198 +0100
++++ ioemu/hw/piix4acpi.c 2006-08-09 21:32:04.400129788 +0100
@@ -0,0 +1,388 @@
+/*
+ * PIIX4 ACPI controller emulation
+}
+
+
-+/* PIIX4 acpi pci configuration space, func 3 */
++/* PIIX4 acpi pci configuration space, func 2 */
+void pci_piix4_acpi_init(PCIBus *bus, int devfn)
+{
+ PCIAcpiState *d;
+ uint8_t *pci_conf;
+
-+ /* register a function devfn of PIIX4 */
++ /* register a function 2 of PIIX4 */
+ d = (PCIAcpiState *)pci_register_device(
+ bus, "PIIX4 ACPI", sizeof(PCIAcpiState),
+ devfn, NULL, NULL);
Index: ioemu/vl.c
===================================================================
--- ioemu.orig/vl.c 2006-08-09 19:54:26.135539222 +0100
-+++ ioemu/vl.c 2006-08-09 19:59:49.772659756 +0100
++++ ioemu/vl.c 2006-08-09 21:29:38.067585110 +0100
@@ -156,7 +156,7 @@
#else
#define MAX_CPUS 1
Index: ioemu/vl.h
===================================================================
--- ioemu.orig/vl.h 2006-08-09 19:54:26.136539109 +0100
-+++ ioemu/vl.h 2006-08-09 19:59:49.734664129 +0100
++++ ioemu/vl.h 2006-08-09 21:31:21.772931536 +0100
@@ -167,6 +167,7 @@
extern int kqemu_allowed;
extern int win2k_install_hack;
extern int smp_cpus;
/* XXX: make it dynamic */
+@@ -922,6 +923,9 @@
+ void piix4_pm_init(PCIBus *bus, int devfn);
+ void acpi_bios_init(void);
+
++/* piix4acpi.c */
++extern void pci_piix4_acpi_init(PCIBus *bus, int devfn);
++
+ /* pc.c */
+ extern QEMUMachine pc_machine;
+ extern QEMUMachine isapc_machine;
Index: ioemu/hw/piix_pci.c
===================================================================
--- ioemu.orig/hw/piix_pci.c 2006-08-09 19:54:19.636318228 +0100
Index: ioemu/hw/mc146818rtc.c
===================================================================
---- ioemu.orig/hw/mc146818rtc.c 2006-08-09 15:04:17.857242121 +0100
-+++ ioemu/hw/mc146818rtc.c 2006-08-09 15:04:24.588603423 +0100
+--- ioemu.orig/hw/mc146818rtc.c 2006-08-09 21:32:18.709516404 +0100
++++ ioemu/hw/mc146818rtc.c 2006-08-09 21:32:24.723838065 +0100
@@ -178,10 +178,27 @@
}
}
static void rtc_copy_date(RTCState *s)
Index: ioemu/hw/pc.c
===================================================================
---- ioemu.orig/hw/pc.c 2006-08-09 15:04:24.316629266 +0100
-+++ ioemu/hw/pc.c 2006-08-09 15:04:24.589603328 +0100
+--- ioemu.orig/hw/pc.c 2006-08-09 21:32:24.449868968 +0100
++++ ioemu/hw/pc.c 2006-08-09 21:32:24.724837952 +0100
@@ -159,7 +159,7 @@
}
QEMUMachine pc_machine = {
Index: ioemu/vl.c
===================================================================
---- ioemu.orig/vl.c 2006-08-09 15:04:24.457615869 +0100
-+++ ioemu/vl.c 2006-08-09 15:04:24.592603043 +0100
+--- ioemu.orig/vl.c 2006-08-09 21:32:24.591852952 +0100
++++ ioemu/vl.c 2006-08-09 21:32:24.727837614 +0100
@@ -163,6 +163,8 @@
int xc_handle;
if (usb_enabled) {
Index: ioemu/vl.h
===================================================================
---- ioemu.orig/vl.h 2006-08-09 15:04:24.321628791 +0100
-+++ ioemu/vl.h 2006-08-09 15:04:24.593602948 +0100
+--- ioemu.orig/vl.h 2006-08-09 21:32:24.454868404 +0100
++++ ioemu/vl.h 2006-08-09 21:32:24.728837501 +0100
@@ -575,7 +575,7 @@
int boot_device,
DisplayState *ds, const char **fd_filename, int snapshot,
Index: ioemu/Makefile.target
===================================================================
---- ioemu.orig/Makefile.target 2006-08-09 15:04:24.795583755 +0100
-+++ ioemu/Makefile.target 2006-08-09 15:04:25.373528824 +0100
+--- ioemu.orig/Makefile.target 2006-08-09 21:32:24.915816410 +0100
++++ ioemu/Makefile.target 2006-08-09 21:32:25.500750429 +0100
@@ -358,6 +358,7 @@
VL_OBJS+= cirrus_vga.o mixeng.o parallel.o acpi.o piix_pci.o
VL_OBJS+= usb-uhci.o
Index: ioemu/xenstore.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ ioemu/xenstore.c 2006-08-09 15:04:25.374528729 +0100
++++ ioemu/xenstore.c 2006-08-09 21:32:25.501750317 +0100
@@ -0,0 +1,187 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General
+}
Index: ioemu/vl.c
===================================================================
---- ioemu.orig/vl.c 2006-08-09 15:04:25.312534622 +0100
-+++ ioemu/vl.c 2006-08-09 15:04:25.377528443 +0100
+--- ioemu.orig/vl.c 2006-08-09 21:32:25.438757422 +0100
++++ ioemu/vl.c 2006-08-09 21:32:25.504749978 +0100
@@ -5243,9 +5243,11 @@
"Standard options:\n"
"-M machine select emulated machine (-M ? for list)\n"
kernel_filename, kernel_cmdline, initrd_filename,
Index: ioemu/monitor.c
===================================================================
---- ioemu.orig/monitor.c 2006-08-09 15:04:24.105649313 +0100
-+++ ioemu/monitor.c 2006-08-09 15:04:25.379528253 +0100
+--- ioemu.orig/monitor.c 2006-08-09 21:32:24.238892765 +0100
++++ ioemu/monitor.c 2006-08-09 21:32:25.505749865 +0100
@@ -24,6 +24,7 @@
#include "vl.h"
#include "disas.h"
int i;
Index: ioemu/block.c
===================================================================
---- ioemu.orig/block.c 2006-08-09 15:04:17.487277167 +0100
-+++ ioemu/block.c 2006-08-09 15:04:25.379528253 +0100
+--- ioemu.orig/block.c 2006-08-09 21:32:18.339558126 +0100
++++ ioemu/block.c 2006-08-09 21:32:25.506749753 +0100
@@ -758,6 +758,7 @@
static void raw_close(BlockDriverState *bs)
{
Index: ioemu/vl.h
===================================================================
---- ioemu.orig/vl.h 2006-08-09 15:04:25.313534527 +0100
-+++ ioemu/vl.h 2006-08-09 15:04:25.380528158 +0100
-@@ -1184,6 +1184,8 @@
+--- ioemu.orig/vl.h 2006-08-09 21:32:25.439757309 +0100
++++ ioemu/vl.h 2006-08-09 21:32:25.506749753 +0100
+@@ -1187,6 +1187,8 @@
void term_print_help(void);
void monitor_readline(const char *prompt, int is_password,
char *buf, int buf_size);
/* readline.c */
typedef void ReadLineFunc(void *opaque, const char *str);
-@@ -1196,6 +1198,13 @@
+@@ -1199,6 +1201,13 @@
void readline_start(const char *prompt, int is_password,
ReadLineFunc *readline_func, void *opaque);
extern char domain_name[];
Index: ioemu/hw/ide.c
===================================================================
---- ioemu.orig/hw/ide.c 2006-08-09 15:04:24.524609503 +0100
-+++ ioemu/hw/ide.c 2006-08-09 15:04:25.381528063 +0100
+--- ioemu.orig/hw/ide.c 2006-08-09 21:32:24.658845396 +0100
++++ ioemu/hw/ide.c 2006-08-09 21:32:25.508749527 +0100
@@ -1158,6 +1158,7 @@
} else {
ide_atapi_cmd_error(s, SENSE_NOT_READY,
Index: ioemu/xenstore.c
===================================================================
---- ioemu.orig/xenstore.c 2006-08-09 15:04:25.374528729 +0100
-+++ ioemu/xenstore.c 2006-08-09 15:04:25.579509243 +0100
+--- ioemu.orig/xenstore.c 2006-08-09 21:32:25.501750317 +0100
++++ ioemu/xenstore.c 2006-08-09 21:32:25.706727195 +0100
@@ -185,3 +185,31 @@
free(image);
free(vec);
+}
Index: ioemu/vl.c
===================================================================
---- ioemu.orig/vl.c 2006-08-09 15:04:25.377528443 +0100
-+++ ioemu/vl.c 2006-08-09 15:04:25.583508863 +0100
+--- ioemu.orig/vl.c 2006-08-09 21:32:25.504749978 +0100
++++ ioemu/vl.c 2006-08-09 21:32:25.709726857 +0100
@@ -6511,6 +6511,7 @@
vnc_display = vnc_display_init(ds, vnc_display, vncunused);
if (vncviewer)
sdl_display_init(ds, full_screen);
Index: ioemu/vl.h
===================================================================
---- ioemu.orig/vl.h 2006-08-09 15:04:25.380528158 +0100
-+++ ioemu/vl.h 2006-08-09 15:04:25.584508768 +0100
-@@ -1203,6 +1203,7 @@
+--- ioemu.orig/vl.h 2006-08-09 21:32:25.506749753 +0100
++++ ioemu/vl.h 2006-08-09 21:32:25.710726744 +0100
+@@ -1206,6 +1206,7 @@
int xenstore_fd(void);
void xenstore_process_event(void *opaque);
void xenstore_check_new_media_present(int timeout);